<?php  
	include '../init.php';
	$oid = $_GET['id'];
	// var_dump($_GET['id']);exit;
		$sql = '
				select og.id,og.oid,og.count,og.price,og.gid,o.id,o.phone,o.receiver,o.address,o.orderNum
				from  orders o, ordersgood og
				where og.oid =o.id and og.oid ='.$oid.'
				order by o.time desc
		';
				
				


	// var_dump($sql);exit;

	
	$result = page($sql);
	$order_list = $result[1];
	$page = $result[0];
	// var_dump($order_list);
?>



<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="<?= PUB_CSS?>commond.css">
	<link rel="stylesheet" href="<?= PUB_CSS?>iconfont/iconfont.css">
</head>
<body>

	<table class='table'>
		<tr>
			<th>商品订单编号</th>
			<th>订单编号</th>
			<!-- <th>商品编号</th> -->
			<th>单价</th>
			<th>数量</th>
			<th>收货人</th>
			<th>电话</th>
			<th>地址</th>


		</tr>
			<?php foreach($order_list as $v): ?>
				<tr>
					<td><?= $v['id']?></td>
					<td><?= $v['orderNum']?></td>
					<!-- <td><?= $v['gid']?></td> -->
					<td><?= $v['price']?></td>
					<td><?= $v['count']?></td>
					<td><?= $v['receiver']?></td>
					<td><?= $v['phone']?></td>
					<td><?= $v['address']?></td>
				</tr>
			<?php endforeach; ?>

		
	</table>
	<?= $page ?>
</body>
</html>